﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace EasyNet.Componets.Core.Locations
{
    public interface ILocation
    {
        /// <summary>
        /// 计算两个位置之间的距离
        /// </summary>
        /// <param name="location1"></param>
        /// <param name="location2"></param>
        /// <returns></returns>
        double GetDistance(LocationPoint location1, LocationPoint location2);

        /// <summary>
        /// 根据城市地址获取位置
        /// </summary>
        /// <param name="address"></param>
        /// <param name="city"></param>
        /// <returns></returns>
        LocationPoint GetLocationByAddress(string address, string city);

        /// <summary>
        /// 根据IP获取位置
        /// </summary>
        /// <param name="ip"></param>
        /// <returns></returns>
        LocationPoint GetLocationByIp(string ip);
    }
}
